
package com.sasis.service.impl;

import java.util.List;

import com.sasis.service.impl.BaseManager;
import com.sasis.model.City;
import com.sasis.dao.CityDao;
import com.sasis.service.CityManager;
import com.sasis.util.PageList;
import com.sasis.util.PageRequest;

public class CityManagerImpl extends BaseManager implements CityManager {
    private CityDao dao;

    /**
     * Set the Dao for communication with the data layer.
     * @param dao
     */
    public void setCityDao(CityDao dao) {
        this.dao = dao;
    }

    /**
     * @see com.sasis.service.CityManager#getCitys(com.sasis.model.City)
     */
    public List getCitys(final City city) {
        return dao.getCitys(city);
    }

    /**
     * @see com.sasis.service.CityManager#getCitys(com.sasis.model.City)
     */
    public List selectCitys(final City city) {
        return dao.selectCitys(city);
    }
    
    /**
     * @see com.sasis.service.CityManager#getCity(String id)
     */
    public City getCity(final String id) {
        return dao.getCity(new Integer(id));
    }

    /**
     * @see com.sasis.service.CityManager#saveCity(City city)
     */
    public void saveCity(City city) {
        dao.saveCity(city);
    }

    /**
     * @see com.sasis.service.CityManager#removeCity(String id)
     */
    public void removeCity(final City city) {
        dao.removeCity(city);
    }
    
    public PageList queryForPageList(String listStatementId,  
    		Object parameterObject, PageRequest pageRequest){
	return dao.queryForPageList(listStatementId,   parameterObject, pageRequest);
}
}
